__author__ = 'chenwei'
# -*- coding: utf-8 -*-
'''
版本一：可以解决最初步的需求，但如果list中还有list，无法实现。
'''
def print_list_max_min(this_list,max_value=False,min_value=False):
    for item in this_list:
        if isinstance(item,list):
            print_list_max_min(item,max_value,min_value)
        else:
            if isinstance(item, (int, float)):
                if item > max_value or max_value == False:
                    max_value = item
                if item < min_value or min_value == False:
                    min_value = item
    print("-"*8+"result"+"-"*8)
    print("this_list=",this_list)
    print("max_value=",max_value)
    print("min_value=",min_value)
    print("-" * 22 )

if __name__ == '__main__':
    lists=[5,1,2,3,4,"abc0",5.5,"6a",-1]
    print_list_max_min(lists)
